import type { RouteRecordRaw } from 'vue-router'

const routeModules: RouteRecordRaw[] = [
    { path: '/', redirect: '/home/statistic' },
    {
        path: '/login',
        name: 'login',
        meta: {
            title: '登录'
        },
        component: () => import('@/pages/login.vue')
    },
    {
        path: '/home',
        name: 'home',
        meta: {
            title: 'Games Mall后台管理系统'
        },
        component: () => import('@/pages/home.vue'),
        children: [
            {
                path: 'statistic',
                name: 'statistic',
                component: () => import('@/pages/statistic.vue')
            },
            {
                path: 'icon',
                name: 'icon',
                component: () => import('@/pages/icon.vue')
            },
            {
                path: 'markdown',
                name: 'markdown',
                component: () => import('@/pages/markdown.vue')
            },
            {
                path: 'richText',
                name: 'richText',
                component: () => import('@/pages/richText.vue')
            },
            {
                path: 'games',
                name: 'games',
                component: () => import('@/pages/games.vue')
            },
            {
                path: 'message',
                name: 'message',
                component: () => import('@/pages/message.vue')
            },
            {
                path: '404',
                name: '404',
                component: () => import('@/pages/404.vue')
            },
            {
                path: 'manager',
                name: 'manager',
                component: () => import('@/pages/manager.vue')
            },
            {
                path: 'form',
                name: 'form',
                component: () => import('@/pages/form.vue')
            },
            {
                path: 'upload',
                name: 'upload',
                component: () => import('@/pages/upload.vue')
            },
            {
                path: 'orders',
                name: 'orders',
                component: () => import('@/pages/orders.vue')
            },
            {
                path: 'chart',
                name: 'chart',
                component: () => import('@/pages/chart.vue')
            },
            {
                path: 'setting',
                name: 'setting',
                component: () => import('@/pages/setting.vue')
            }
        ]
    }
]

export default routeModules
